home *** CD-ROM | disk | FTP | other *** search
- {-------------------------- DOOR --------------------------
-
- {This macro will create a door symbol to the users input specs.
- {These variables are Width,Thickness,Door Left or Right and the
- {angle of the door. All pieces of the door are referenced off the
- {point entered by user.
-
- {Some default values are set, User is prompted for variables.
- #DW=3
- #WAL=.5
- PROMPT Prompt=`Enter WIDTH of door` Var=#DW Typ=Num
- PROMPT Prompt=`Enter THICKNESS of Wall` Var=#WAL Typ=Num
- PROMPT Prompt=`Draw Door on LEFT Y-N` Var=#SID Typ=Swit
- PROMPT Prompt=`Angle of Door` Var=#AD Typ=Num
- PROMPT Prompt=`Locate Point` Var=#P1 Typ=Coor
-
- {Door jambs and header are drawn in.
- LI La=143 Pe=1 [A,#P1.x-(#DW/2),#P1.y-(#WAL/2)|0,#WAL|^|#DW|0,-#WAL|;]
- LI La=145 Pe=5 [0,0|-#DW|^|0,#WAL|#DW|;]
-
- {Side to draw door on is checked by system.
- IF (#SID == 0), GOTO RIG:
-
- {Door and door swing are drawn in.
- LI La=120 Pe=4 [A,#P1.x-(#DW/2),#P1.y+(#WAL/2)|P,#DW,#AD|P,1.5",#AD-90] \
- [P,#DW,#AD+180|k|;]
- AR R La=121 Pe=0 [0,0|#DW|P,#DW,#AD|;]
- GOTO END:
-
- {This section draws door on the right.
- RIG:
- {System reverses angle of door.
- IF (#AD == 90), Goto START:
- #AD=180-#AD
- START:
- {Door and door swing are drawn in.
- LI La=120 Pe=4 [A,#P1.x+(#DW/2),#P1.y+(#WAL/2)|P,#DW,#AD|P,1.5",#AD+90] \
- [P,#DW,#AD+180|k|;]
- AR R La=121 Pe=0 [0,0|-#DW|P,#DW,#AD|;]
-
- {System groups door components.
- END:
- PROMPT Prompt=`Do You Want a TAG Name on Group` Var=#AN Typ=Swit
- If (#AN == 0), Goto GRP:
- PROMPT Prompt=`Enter TAG Name` Var=#TAG Typ=Str
- GP CL=120 Tag=#TAG [A,#P1.x,#P1.y|-|-|-|-|;]
- Goto Rot:
-
- GRP:
- GP CL=120 Tag=\ \ [A,#P1.x,#P1.y|-|-|-|-|;]
-
- {Door is rotated if desired.
- ROT:
- PROMPT Prompt=`Rotate DOOR Y/N` Var=#AN Typ=Swit
- IF (#AN == 0), Goto DONE:
- PROMPT Prompt=`Enter ROTATION` Var=#RT Typ=Num
- TR A=#RT [A,#P1.x,#P1.y+(#WAL/2),O|;]
-
- DONE:
- MESSAGE St=`All Done` Time=1
- RETURN
-